
#ifndef  __MSG_QUEUE_H__
#define  __MSG_QUEUE_H__

//********************************************************************
#include "sys_port.h"

#include "list.h"
//********************************************************************
#ifdef __cplusplus
extern "C" {
#endif
//********************************************************************
typedef struct 
{
    int cmd;
    int data0;
    int data1;
    int data2;
    void* para;
} msg_notify_t;

typedef struct  {
	slist_t 	  e_tail;
    msg_notify_t  e_attr;
}msg_link_t;

typedef struct  {
    int         len;
	slist_t *   e_head;
}msg_queue_t;
//********************************************************************
int msg_queue_init(void);
int msg_queue_destroy(void);
int msg_queue_send(msg_notify_t *msg);
int msg_queue_recv(msg_notify_t *msg);
int msg_queue_trav(void);
int msg_queue_get_len(void);
//********************************************************************
#ifdef __cplusplus
}
#endif
//********************************************************************

#endif

